package com.example.leepong.Game.Events;

import java.util.ArrayList;

/**
 * Created by Ichigo on 06/05/2014.
 */
public class EventsAggregator {
    ArrayList<GameStateListener> _gameStateListeners = new ArrayList<GameStateListener>();

    public void Add(GameStateListener listener) {
        _gameStateListeners.add(listener);
    }

    public void FireGamePaused() {
        for (GameStateListener l : _gameStateListeners) {
            l.OnGamePaused();
        }
    }

    public void FireGameResumed() {
        for (GameStateListener l : _gameStateListeners) {
            l.OnGameResumed();
        }
    }

}
